]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
build: Enable no-omit-frame-pointer for all non-plain builds
authorrobert.mader@collabora.com <robert.mader@collabora.com>
Tue, 10 Oct 2023 02:17:51 +0000 (04:17 +0200)
committerRobert Mader <robert.mader@collabora.com>
Tue, 9 Jan 2024 16:41:12 +0000 (17:41 +0100)
To mirror Mutter.

This is useful for local installations with e.g. the `release`
buildtype.
Further more, Fedora has been doing the same system wide and it
apparently was helpful in various ways.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2982>

meson.build

index f7e618987f1a16573d84f9c8170c1096417741f4..fef46af66a992632395ccadbdf0f3b7303000633 100644 (file)
@@ -185,7 +185,9 @@ cdata.set('HAVE_POLKIT_AUTOCLEANUP', polkit_has_autocleanup)
 
 buildtype = get_option('buildtype')
 if buildtype != 'plain'
-  all_warnings = [
+  gs_c_args = [
+    '-fno-omit-frame-pointer',
+    '-mno-omit-leaf-frame-pointer',
     '-fno-strict-aliasing',
     '-Wpointer-arith',
     '-Wmissing-declarations',
@@ -222,17 +224,16 @@ if buildtype != 'plain'
     '-Werror=empty-body',
     '-Werror=write-strings',
   ]
-  supported_warnings = cc.get_supported_arguments(all_warnings)
-  add_project_arguments(supported_warnings, language: 'c')
-endif
 
-if get_option('debug')
-  debug_c_args = [
-    '-DG_ENABLE_DEBUG',
-    '-fno-omit-frame-pointer'
-  ]
-  supported_debug_c_args = cc.get_supported_arguments(debug_c_args)
-  add_project_arguments(supported_debug_c_args, language: 'c')
+
+  if get_option('debug')
+    gs_c_args += [
+      '-DG_ENABLE_DEBUG',
+    ]
+  endif
+
+  supported_gs_c_args = cc.get_supported_arguments(gs_c_args)
+  add_project_arguments(supported_gs_c_args, language: 'c')
 endif
 
 config_h = configure_file(